package com.biovr.backend.utils;

import org.springframework.stereotype.Component;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by monodev on 2017/5/8.
 * 时间日期帮助类
 */
@Component
public class DateTimeUtils {
    /*
    返回当前格式化后的时间日期 yyyy-MM-dd HH:mm:ss
     */
    public  String getCurrDateTimeString(){
        Date currentTime = new Date();
        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String dateString = formatter.format(currentTime);
        return dateString ;
    }
}
